Option Strict Off
Option Explicit On
Module menuImage
	Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Integer) As Integer
	Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Integer, ByVal nPos As Integer) As Integer
	Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Integer, ByVal nPos As Integer) As Integer
	Private Declare Function ModifyMenu Lib "user32"  Alias "ModifyMenuA"(ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer, ByVal wIDNewItem As Integer, ByVal lpString As String) As Integer
	Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer, ByVal hBitmapUnchecked As Integer, ByVal hBitmapChecked As Integer) As Integer
	'UPGRADE_NOTE: Main was upgraded to Main_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
	Public Sub Main_Renamed()
		'menu.Show'
		'ImagenesMenu menu, 0, 0, menu.ImageList1.ListImages(1).Picture
		'ImagenesMenu menu, 0, 1, menu.ImageList1.ListImages(2).Picture
		'ImagenesMenu menu, 0, 3, menu.ImageList1.ListImages(3).Picture
		'ImagenesMenu menu, 0, 22, menu.ImageList1.ListImages(2).Picture
		'ImagenesMenu menu, 0, 5, menu.ImageList1.ListImages(4).Picture
		
		'ImagenesMenu menu, 1, 0, menu.ImageList1.ListImages(4).Picture
		'ImagenesMenu menu, 1, 1, menu.ImageList1.ListImages(5).Picture
		'ImagenesMenu menu, 1, 2, menu.ImageList1.ListImages(6).Picture
		'ImagenesMenu menu, 2, 0, menu.ImageList1.ListImages(7).Picture
		'ImagenesMenu menu, 2, 2, menu.ImageList1.ListImages(8).Picture
	End Sub
	Public Sub ImagenesMenu(ByVal Form As System.Windows.Forms.Form, ByVal MenuID As Short, ByVal SubMenu As Short, ByVal BitmapUnchecked As Integer, Optional ByVal BitmapChecked As Integer = 0)
		On Error Resume Next
		Dim hMenuID, hMenu, hSubMenu, X As Object
		'UPGRADE_WARNING: Couldn't resolve default property of object hMenu. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		hMenu = GetMenu(menu_Renamed.Handle.ToInt32)
		'UPGRADE_WARNING: Couldn't resolve default property of object hMenu. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		'UPGRADE_WARNING: Couldn't resolve default property of object hSubMenu. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		hSubMenu = GetSubMenu(hMenu, MenuID)
		'UPGRADE_WARNING: Couldn't resolve default property of object hSubMenu. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		'UPGRADE_WARNING: Couldn't resolve default property of object hMenuID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		hMenuID = GetMenuItemID(hSubMenu, SubMenu)
		'UPGRADE_WARNING: Couldn't resolve default property of object hMenuID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		'UPGRADE_WARNING: Couldn't resolve default property of object hMenu. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		'UPGRADE_WARNING: Couldn't resolve default property of object X. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		X = SetMenuItemBitmaps(hMenu, hMenuID, 0, BitmapUnchecked, BitmapChecked)
	End Sub
End Module